﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.YG
{
    /// <summary>
    /// 阳光人寿附加康泰住院费用医疗保险
    /// </summary>
    class Class16
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("住院"))
            {
                da.Value = ppa.Amount * 1200;

                da.Description = "最大限额";

            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("住院"))
            {
                int h = (int)ppa.SchemePeriodActing.SchemeActing.GetAuxConfigValue("住院天数");

                h = h > 90 ? 90 : h;

                da.Value = h * 10;

            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("重症监护"))
            {
                ppa.SchemePeriodActing.InsurantStates.Add("住院");

                int h = (int)ppa.SchemePeriodActing.SchemeActing.GetAuxConfigValue("重症监护天数");

                h = h > 30 ? 30 : h;

                da.Value = h * 10 *2;

            }
        }
    }
}
